www-Sharp.ClrHost

Welcome to www-Sharp.ClrHost

www-Sharp.ClrHost is an extension for Internet Explorer HTML applications. It contains some enhancments:

  • Host .Net objects with OBJECT tag;
  • Place .Net control on HTML page with OBJECT tag;
  • Bind ADO.Net DataSet to HTML controls with dataSrc and dataFld attributes;
  • Compile HTML application into single file.

Why Use HTAs

Historically, programming languages like C++ and Microsoft Visual Basic® have provided the object models and access to system resources that developers demand. With HTA it is now time to add Dynamic HTML (DHTML) with script to that list. HTAs not only support everything a Web page does—namely HTML, Cascading Style Sheets (CSS), scripting languages, and behaviors—but also HTA-specific functionality. This added functionality provides control over user interface design and access to the client system. Moreover, run as trusted applications, HTAs are not subject to the same security constraints as Web pages. As with any executable file, the user is asked once, before the HTA is downloaded, whether to save or run the application; if saved to the client machine, it simply runs on demand thereafter. The end result is that HTAs runs like any executable (.exe) written in C++ or Visual Basic.

HTAs are suited to many uses, whether you are prototyping, making wizards, or building full-scale applications. Whatever DHTML and script deliver now—forms, multimedia, Web applications, HTML editors, and browsers—so can HTAs...and then some. Best of all, HTAs make some tasks easier. The simplicity of generating prototypes using HTAs makes it possible for program managers and designers to script dialog boxes and alerts while the C++ or Visual Basic developers program the underlying functionality.

Why Use www-Sharp.ClrHost

HTML applications have some advantages over standard Win32 and .Net Windows Forms applications:

  • They are easer to write. If you are able to create home page and write some functions with JScript or VBScript you are ready to write your first HTML application. If not — HTML application is the easest way to learn programming.
  • HTML applications have reacher and more customizeable user interface than Win32 and .Net Windows Forms applications. With HTML you design user interface and with Win32 and .Net — you program it. Using cascading style sheets let you apply skins to an application with almost no efforts. Page-oriented applications, navigation directly from one page to another, page history, and more become available to your application. Windows applications also don't support text very well, especially when you try to mix text and graphics on the same page. Creating a Windows application that automatically flows text around graphics and that responds to user-initiated changes in the window size and user preferences for fonts and readability is a huge amount of work and with HTML application this is done natively without efforts.
  • HTML application can have multiple entry points — i.e. when installing application you may create some items in Programs menu that will start program with different startup pages.
  • Dividing development to designing user interface and programming application logic will produce more qualitative application.
  • Using .Net objects and controls in HTML application makes full power of .Net framework available to your application. HTML application becomes as powerfull as .Net Windows Forms application and combines advantages of both worlds — HTML and Win32.

How to use www-Sharp.ClrHost

Use of www-Sharp.ClrHost is very easy. All you need is to add OBJECT element in your HTML page, set parameters with PARAM tags and use properties and methods from JScript, VBScript or other ActiveX script language. All www-Sharp.ClrHost elements except ClrControl should be added in HEAD section — they are not visual. ClrControl should be added in BODY section as any other ActiveX control.

Compiled HTML applications are produced with HTA compiler — htac.exe. Startup file is index.hta in the root application directory.

www-Sharp.ClrHost SDK contains some examples that shows basic use of its objects.

Installation

Compiled HTML application requires adding some registry entries. These entries could be added by executing install.reg file that could be found in Install directory of www-Sharp.ClrHost SDK.

If HTA uses .Net framework, www-Sharp.ClrHost should be installed too. It can be installed by adding CODEBASE attribute to OBJECT tag for the first www-Sharp.ClrHost object in startup page or it can be installed by installation project. HtaClrHost.cab is located in redist directory in www-Sharp.ClrHost SDK and is avaiable at http://www-sharp.com/downloads/HtaClrHost.cab .

To install with application installator you should place HtaClrHost.dll into %SYSTEM%\www Sharp_ ClrHost\ directory and register it for COM (registration for COM will automatically register Compiled HTML application, so no other registry keys are required) . Sample installation project for popular InnoSetup installer is located in Install directory of www-Shrap.ClrHost SDK.

Additional files

www-Sharp.ClrHost includes 2 manifest files: mshta.exe.manifest and hh.exe.manifest. If you will place them into %System% directory (usually C:\Windows\System or C:\WinNt\System32) all HTML applications and HTML help files will use XP style common controls (open/save dialog boxes, trees, tab controls etc.) on Windows XP. Those files will not affect prior Windows versions.

To see XP-style HTML pages you may include

<META http-equiv="MSThemeCompatible" content="Yes">

into HEAD section of HTML page.

Learn more about HTA on MSDN.


www-Sharp.ClrHost HTA compiler

HTA compiler

www-Sharp.ClrHost SDK includes HTA compiler as htac.exe. It can compile HTML pages, images, video, Flash, XML and other files into single compiled HTML application.

Startup file for compiled HTA application is index.hta in the root directory.

HTA compiler parameters

Compiling www-Sharp HTA project:

htac.exe @<project_file>

project_file - www-Sharp compiled HTA project file.

For example: htac.exe @hello.wshp

Compiling files with command line parameters:

htac.exe /Output:<output_file> /RootDir:<root_dir> /Log f1, /recurse:f2, f3...
or
htac.exe /out:<output_file> /root:<root_dir> /log f1, /r:f2, f2...

output_file - output file name. Default is output.wsits.
root_dir - root directory for the project. Default is current directory.
log - if specified, output file names.
recurse:, r: add files from subdirectories.
fX - files to include into compiled HTA.
File names should be relative to root directory and
can include wildcards.

For example: htac.exe /out:hello.wsits *.hta /recurse:*.htm* images\*.jpg

Compiling simple HTA project:

htac.exe @@<simple_project>

simple_project - file that contains command-line parameters, one parameter on each line.

For example, htac.exe @@helo.build


www-Sharp.ClrHost objects

www-Sharp.ClrHost is based on objects placed on HTML page with OBJECT tag. This section describes objects that are available in www-Sharp.ClrHost and their properties and parameters.

Properties could be accessed from script (JScript, VBScript and others), parameters could be specified with PARAM tag.

Objects available in www-Sharp.ClrHost are:

Object | Description
ClrDomain | Represents .Net domain. One domain is created automatically when first ClrDomain object is encountered.
ClrInstance | Represents .Net object. If object is COM-visible you may access its properties and methods from script. You may specify initial values for object properties with PARAM tags. .Net object must have public default constructor (constructor that has no parameters).
ClrControl | Represents .Net control placed onto HTML page. Most but not all .Net controls could be placed onto HTML page. If control is COM-visible you may access control properties and methods from script. You may specify initial values for control propertyies with PARAM tags. Control must have public default constructor (constructor that has no parameters).
DataSetDSO | Provides access to ADO.Net DataSet with data bindings - using dataSrc and dataFld attributes. Can initialize ADO.Net DataSet and fill with data it from DBMS (SqlServer, OleDb source etc.) or from XML file using PARAM tags.
DataViewDSO | Provides access to ADO.Net DataTable and DataView with databindings - using dataSrc and dataFld attributes. Can be used with and withou DataSetDSO. Can initialize DataTable or DataView and fill it with data from DBMS (SqlServer, OleDb sources etc).
DataColumnCollection | Represents Columns collection in DataViewDSO. Columns object can be used from scripts. You may access columns collection with DataViewDSO.Columns property.
DataColumn | Represent column in DataViewDSO.Columns collection. Column object can be used from scripts. You may access column object with DataView.Columns.Item property.


www-Sharp.ClrHost objects - ClrDomain

www-Sharp.ClrHost ClrDomain object

Represents .Net domain. One domain is created automatically when first ClrDomain object is encountered. You may specify almost all properties that AppDomainSetup object has. ApplicationBase for main domain can not be specified and it is directory where .hta, html, .wsits, .its or .chm file is located or root directory of web-site.

ClassID:

89F1D07D-3AC6-4ACB-B8A4-8EDDDCB0142E

Properties

Property | Description
DomainName | Friendly name of this application domain.
MainDomain | Shows is this domain the main domain in application or not. Application has one main domain for every site that it contains - for example, one domain for compiled HTML application.
ApplicationBase | Gets the name of the directory containing the application. Read-only.
ApplicationName | Gets or sets the name of the application.
CachePath | Gets or sets the name of an area specific to the application where files are shadow copied.
ConfigurationFile | Gets or sets the name of the configuration file for an application domain. Default configuration file for compiled HTML application - appfile.ext.config, where appfile.ext is filename of the application with extenstion, for example for Hello.wsits default configuration file is Hello.wsits.config.
DynamicBase | Gets or sets the directory where dynamically generated files are stored and accessed.
LicenseFile | Gets or sets the location of the license file associated with this domain.
PrivateBinPath | Gets or sets the list of directories that is combined with the ApplicationBase directory to probe for private assemblies.
PrivateBinPathProbe | Gets or sets the private binary directory path used to locate an application.
ShadowCopyDirectories | Gets or sets the names of the directories containing assemblies to be shadow copied.
ShadowCopyFiles | Gets or sets a string that indicates whether shadow copying is turned on or off.

Methods

Method | Description
Open | Creates .Net domain. Domain is created automatically when CreateInstance is called.
Close | Unloads .Net domain.
CreateInstance (string AssemblyName, string TypeName) | Creates new .Net object instance. Object must have default constructor (constructor without parameters).

Parameters

Parameter | Description
DomainName | Friendly name of this application domain.
MainDomain | Shows is this domain the main domain in application or not. Application has one main domain for every site that it contains - for example, one domain for compiled HTML application.
ApplicationName | Gets or sets the name of the application.
CachePath | Gets or sets the name of an area specific to the application where files are shadow copied.
ConfigurationFile | Gets or sets the name of the configuration file for an application domain. Default configuration file for compiled HTML application - appfile.ext.config, where appfile.ext is filename of the application with extenstion, for example for Hello.wsits default configuration file is Hello.wsits.config.
DynamicBase | Gets or sets the directory where dynamically generated files are stored and accessed.
LicenseFile | Gets or sets the location of the license file associated with this domain.
PrivateBinPath | Gets or sets the list of directories that is combined with the ApplicationBase directory to probe for private assemblies.
PrivateBinPathProbe | Gets or sets the private binary directory path used to locate an application.
ShadowCopyDirectories | Gets or sets the names of the directories containing assemblies to be shadow copied.
ShadowCopyFiles | Gets or sets a string that indicates whether shadow copying is turned on or off.


www-Sharp.ClrHost objects - ClrInstance

www-Sharp.ClrHost ClrInstance object

Represents .Net object. It lets you create .Net object when HTML page loads and use it from script.

To use properties/methods of .Net object from JScript, VBScript and other ActiveX scripts those properties and methods should be COM-visible - most .Net objects that are included in .Net framework are not COM-visible, most .Net objects in custom assemblies are COM-visible.

www-Sharp.ClrHost will create .Net object with its default constructor (constructor that has no parameters) and will set properties to values specified with PARAM tags.

ClassID:

4CC2B254-F4C7-4F52-881E-C2E10B14E003

Properties

Property | Description
Instance | Instance of .Net object. This property is default.

Public properties and methods exposed by .Net object could be used too.

Parameters

Parameter | Description
AssemblyName | The display name of the assembly. Instance is created with AppDomain.CreateInstance() method.
TypeName | Full type name (with namespace).

Public properties could be set with PARAM tag.


www-Sharp.ClrHost objects - ClrControl

www-Sharp.ClrHost ClrControl object

Represents .Net Control. It lets you place .Net control onto HTML page and use it from script.

To use properties/methods of .Net control from JScript, VBScript and other ActiveX scripts those properties and methods should be COM-visible - most .Net controls that are included in .Net framework are not COM-visible, most .Net controls in custom assemblies are COM-visible. If you need to use .Net control included that is not COM-visible, you may create COM-visible descendant and use it.

Not all .Net controls can be successfully placed onto HTML page. For example, DataGrid does not display data if placed on HTML page.

www-Sharp.ClrHost will create .Net control with its default constructor (constructor that has no parameters) and will set properties to values specified with PARAM tags.

ClassID:

1D0542B3-2139-4138-B9E0-0AB5D1AF8D49

Properties

Property | Description
Control | Instance of .Net control. This property is default.

Public properties and methods exposed by .Net control could be used too.

Parameters

Parameter | Description
AssemblyName | The display name of the assembly. Instance is created with AppDomain.CreateInstance() method.
TypeName | Full type name (with namespace).

Public properties could be set with PARAM tag.


www-Sharp.ClrHost objects - DataSet DSO

www-Sharp.ClrHost DataSet DSO object

Represents ADO.Net DataSet. It lets you use ADO.Net DataSet as source for data bindings (dataSrc and dataFld attributes) on HTML page.

ADO.Net DataSet may be initially filled with data using Xml and XmlSchema parameters or from DBMS (SqlServer, OleDb source etc.) using AssemblyName, DataAdapterTypeName, ConnectionTypeName, ConnectionString, TABLE_XXX and RELATION_XXX parameters.

ClassID:

A53ECD51-C062-4B08-97F0-4944CD7D88E7

Properties

Property | Description
DataSet | ADO.Net DataSet instance. This object is not COM-visible so its properties and methods can not be used from script directy. But ADO.Net DataSet may be passed as parameter to .Net method (for example, method of object created with ClrDomain.CreateInstance or object placed onto HTML page as ClrInstance).
AssemblyName | The display name of the assembly. For example, "System.Data, Version = 1.0.5000.0, PublicKeyToken = b77a5c561934e089, Culture = neutral" (without quotes).
DataAdapterTypeName | Full type name (with namespace) of DataAdapter object. For example, "System.Data.SqlClient.SqlDataAdapter" or "System.Data.OleDb.OleDbDataAdapter".
ConnectionTypeName | Full type name (with namespace) of Connection object. For example, "System.Data.SqlClient.SqlConnection" or "System.Data.OleDb.OleDbConnection". Currently this parameter is not used.
ConnectionString | Gets or sets the string used to open a database.
CommandBuilderTypeName | Full type name (with namespace) of CommandBuilder object. For example, "System.Data.SqlClient.SqlCommandBuilder" or "System.Data.OleDb.OleDbCommandBuilder". This parameter is used to with Update() method.
QuotePrefix | QuotePrefix for CommandBuilder.
QuoteSuffix | QuoteSuffix for CommandBuilder.
Xml | URL or file name of .xml file used to load ADO.Net DataSet. Can be relative URL, i.e. XML file can be compiled into HTML application.
XmlSchema | URL or file name of .xsd file used to load ADO.Net DataSet schema. Can be relative URL, i.e. XML schema file can be compiled into HTML application.
Namespace | Gets or sets the namespace of the DataSet.
Prefix | Gets or sets an XML prefix that aliases the namespace of the DataSet.
ExtendedProperties[string Name] | Gets the customized user information associated with the DataSet.

Methods

Method | Description
FillTable(string TableName, string CommandText) | Fills ADO.Net DataSet table with data retrieved by executing command specified by CommandText. New table will be named according TableName.
AddRelation(string RelationName, string ParentTable, string ParentColumns, string ChildTable, stringChildColumns) | Adds relation to ADO.Net DataSet. Columns should be separated with comma (',').
HasErrors() | Gets a value indicating whether there are errors in any of the DataTable objects within this DataSet.
HasChanges() | Gets a value indicating whether the DataSet has changes, including new, deleted, or modified rows.
Update() | Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet.
ReadXmlFromFile(string FileName) | Reads XML schema and data into the DataSet.
ReadXmlSchemaFromFile(string FileName) | Reads an XML schema into the DataSet.
WriteXmlToFile(string FileName) | Writes XML data, and optionally the schema, from the DataSet.
WriteXmlSchemaToFile(string FileName) | Writes the DataSet structure as an XML schema.

Parameters

Parameter | Description
AssemblyName | The display name of the assembly. For example, "System.Data, Version = 1.0.5000.0, PublicKeyToken = b77a5c561934e089, Culture = neutral" (without quotes).
DataAdapterTypeName | Full type name (with namespace) of DataAdapter object. For example, "System.Data.SqlClient.SqlDataAdapter" or "System.Data.OleDb.OleDbDataAdapter".
ConnectionTypeName | Full type name (with namespace) of Connection object. For example, "System.Data.SqlClient.SqlConnection" or "System.Data.OleDb.OleDbConnection". Currently this parameter is not used.
ConnectionString | Gets or sets the string used to open a database.
CommandBuilderTypeName | Full type name (with namespace) of CommandBuilder object. For example, "System.Data.SqlClient.SqlCommandBuilder" or "System.Data.OleDb.OleDbCommandBuilder". This parameter is used to with Update() method.
QuotePrefix | QuotePrefix for CommandBuilder.
QuoteSuffix | QuoteSuffix for CommandBuilder.
Xml | URL or file name of .xml file used to load ADO.Net DataSet. Can be relative URL, i.e. XML file can be compiled into HTML application.
XmlSchema | URL or file name of .xsd file used to load ADO.Net DataSet schema. Can be relative URL, i.e. XML schema file can be compiled into HTML application.
TABLE_XXX | If specified, adds table with name XXX. CommandText used to fill table is in parameter value. For example, <PARAM name="TABLE_customers" value="Select * from customers"> fills table customers with data retrieved from command Select * from customers.
RELATION_XXX | Adds relation to ADO.Net DataSet. XXX specify relation name, value attribute is in form: "parent_table=XXX; parent_columns=XXX; child_table=XXX; child_columns=XXX" (replace XXX with valid values). Columns should be separated with comma (',').


www-Sharp.ClrHost objects - DataView DSO

www-Sharp.ClrHost DataView DSO object

Represents ADO.Net DataView. It lets you use ADO.Net DataView as source for data bindings (dataSrc and dataFld attributes) on HTML page.

ADO.Net DataSet may be initially filled with data using Xml and XmlSchema parameters or from DBMS (SqlServer, OleDb source etc.) using AssemblyName, DataAdapterTypeName, ConnectionTypeName, ConnectionString, TABLE_XXX and RELATION_XXX parameters.

ClassID:

E3BC8FCA-E3F4-4B98-8627-9D3D343F9DA0

Properties

Property | Description
DataTable | ADO.Net DataTable instance. This object is not COM-visible so its properties and methods can not be used from script directy. But ADO.Net DataSet may be passed as parameter to .Net method (for example, method of object created with ClrDomain.CreateInstance or object placed onto HTML page as ClrInstance).
DataView | ADO.Net DataView instance. May be null if UseView is false. This object is not COM-visible so its properties and methods can not be used from script directy. But ADO.Net DataSet may be passed as parameter to .Net method (for example, method of object created with ClrDomain.CreateInstance or object placed onto HTML page as ClrInstance).
DataSetID | ID of www-Sharp.ClrHost DataSetDSO object. DataSetDSO should be on the same page as DataViewDSO.
TableName | Name of the table in ADO.Net DataSet for which DataViewDSO is bound.
AssemblyName | The display name of the assembly. For example, "System.Data, Version = 1.0.5000.0, PublicKeyToken = b77a5c561934e089, Culture = neutral" (without quotes).
DataAdapterTypeName | Full type name (with namespace) of DataAdapter object. For example, "System.Data.SqlClient.SqlDataAdapter" or "System.Data.OleDb.OleDbDataAdapter".
ConnectionTypeName | Full type name (with namespace) of Connection object. For example, "System.Data.SqlClient.SqlConnection" or "System.Data.OleDb.OleDbConnection". Currently this parameter is not used.
ConnectionString | Gets or sets the string used to open a database.
CommandText | Gets or sets the SQL statement or stored procedure to execute at the data source.
CommandBuilderTypeName | Full type name (with namespace) of CommandBuilder object. For example, "System.Data.SqlClient.SqlCommandBuilder" or "System.Data.OleDb.OleDbCommandBuilder". This parameter is used to with Update() method.
QuotePrefix | QuotePrefix for CommandBuilder.
QuoteSuffix | QuoteSuffix for CommandBuilder.
Filter | Gets or sets the expression used to filter which rows are viewed in the DataView.
Sort | Gets or sets the sort column or columns, and sort order for the DataView.
RowStateFilter | Gets or sets the row state filter used in the DataView.
UseView | If true - use DataView, if false - DataTable. Default is true.
Columns | Columns collection of DataTable. Provides information about columns in DataView.
Namespace | Gets or sets the namespace for the XML represenation of the data stored in the DataTable.
Prefix | Gets or sets the namespace for the XML represenation of the data stored in the DataTable.
ExtendedProperties[string Name] | Gets the customized user information associated with the DataTable.

Methods

Method | Description
Open | Opens DataView or DataTable. Called automatically when object loads.
Close | Closes DataView or DataTable.
EndEdit | Ends an edit procedure for current row. Called automatically when moving to new row. Edit procedure begins automatically when first value is changed.
CancelEdit | Cancels an edit procedure for current row.
AcceptChanges | Commits all the changes made to this table since the last time AcceptChanges was called. This method affects DataTable.
RejectChanges | Rolls back all changes that have been made to the table since it was loaded, or the last time AcceptChanges was called. This method affects DataTable.
Reset | Resets the DataTable to its original state.
Compute(string Expression, string Filter) | Computes the given expression on the current rows that pass the filter criteria. This method affects all rows in DataTable.
Refresh | Calls EndEdit and refreshes HTML data bindings.
CreateChildView(int RowNumber, string RelationName) | Returns a DataView for the child DataTable. RowNumber is 1-based.
Update() | Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataView or DataTable.

Parameters

Parameter | Description
DataSetID | ID of www-Sharp.ClrHost DataSetDSO object. DataSetDSO should be on the same page as DataViewDSO.
TableName | Name of the table in ADO.Net DataSet for which DataViewDSO is bound.
AssemblyName | The display name of the assembly. For example, "System.Data, Version = 1.0.5000.0, PublicKeyToken = b77a5c561934e089, Culture = neutral" (without quotes).
DataAdapterTypeName | Full type name (with namespace) of DataAdapter object. For example, "System.Data.SqlClient.SqlDataAdapter" or "System.Data.OleDb.OleDbDataAdapter".
ConnectionTypeName | Full type name (with namespace) of Connection object. For example, "System.Data.SqlClient.SqlConnection" or "System.Data.OleDb.OleDbConnection". Currently this parameter is not used.
ConnectionString | Gets or sets the string used to open a database.
CommandText | Gets or sets the SQL statement or stored procedure to execute at the data source.
CommandBuilderTypeName | Full type name (with namespace) of CommandBuilder object. For example, "System.Data.SqlClient.SqlCommandBuilder" or "System.Data.OleDb.OleDbCommandBuilder". This parameter is used to with Update() method.
QuotePrefix | QuotePrefix for CommandBuilder.
QuoteSuffix | QuoteSuffix for CommandBuilder.
Filter | Gets or sets the expression used to filter which rows are viewed in the DataView.
Sort | Gets or sets the sort column or columns, and sort order for the DataView.
RowStateFilter | Gets or sets the row state filter used in the DataView.
UseView | If true - use DataView, if false - DataTable. Default is true.
Columns | Columns collection of DataTable. Provides information about columns in DataView.


www-Sharp.ClrHost objects - DataColumnCollection

www-Sharp.ClrHost DataColumnCollection object

Represents ADO.Net DataView columns collection. It lets you use retrieve information about columns in ADO.Net DataView. DataColumnCollection can be obtained as Columns property of DataViewDSO.

Properties

Property | Description
Count | Returns number of columns in collection.
Item[Index] | Returns www-Sharp.ClrHost DataColumn object that corresponds to ADO.Net DataColumn. Index is 1-based numeric index or column name.


www-Sharp.ClrHost objects - DataColumn

www-Sharp.ClrHost DataColumn object

Represents column in DataView DSO. DataColumn can be obtained as Item property of DataViewDSO.Columns collection.

Properties

Property | Description
DataColumn | DataColumn object. This object can not be used from script but can be passed to .Net method.
AllowDBNull | Gets or sets a value indicating whether null values are allowed in this column for rows belonging to the table.
AutoIncrement | Gets or sets a value indicating whether the column automatically increments the value of the column for new rows added to the table.
AutoIncrementSeed | Gets or sets the starting value for a column that has its AutoIncrement property set to true.
AutoIncrementStep | Gets or sets the increment used by a column with its AutoIncrement property set to true.
Caption | Gets or sets the caption for the column.
ColumnMapping | Gets or sets the MappingType of the column.
DataTypeCode | Gets or sets the TypeCode of type of data stored in the column.
DataTypeName | Gets or sets the name of type of data stored in the column.
DefaultValue | Gets or sets the default value for the column when creating new rows.
Expression | Gets or sets the expression used to filter rows, calculate the values in a column, or create an aggregate column.
MaxLength | Gets or sets the maximum length of a text column.
Namespace | Gets or sets the namespace of the DataColumn.
Ordinal | Gets the position of the column in the DataColumnCollection collection.
Prefix | Gets or sets an XML prefix that aliases the namespace of the DataTable.
ReadOnly | Gets or sets a value indicating whether the column allows changes once a row has been added to the table.
Unique | Gets or sets a value indicating whether the values in each row of the column must be unique.


Licence

END-USER LICENSE AGREEMENT FOR WWW-SHARP.CLRHOST

IMPORTANT-READ CAREFULLY: This Software End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and the mentioned author (Viatcheslav V. Vassiliev, "AUTHOR") of this Software for the software product identified above, which may include computer software, associated media, printed materials, and "online" or electronic documentation ("SOFTWARE"). By downloading, installing, copying, or otherwise using the SOFTWARE, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, do not install or use the SOFTWARE.

The SOFTWARE is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. Author owns the title, copyright and other intellectual property rights in the SOFTWARE. The SOFTWARE is licensed, not sold.

1. GRANT OF LICENSE. This EULA grants you the following rights:

a. General. You may install and use any number of copies of the SOFTWARE on any number of computers, including workstations, terminals or other digital electronic devices, for the purpose of designing, developing and testing your application(s) which work in conjunction with SOFTWARE.

b. Sample Code. You may modify the portions of the SDK designated as "Sample Code" for the purpose of designing, developing and testing your Application.

c. Redistribution of SOFTWARE. You may copy and redistribute any file that is placed in redist folder while installation of the product. You may not resitribute other file or SOFTWARE in its entirety or any part of SOFTWARE that is not placed in redist folder by installation process . All redistribution are subject to the following restrictions and limitations:

(i) If you redistribute the SOFTWARE , your copy must be a true copy of the SOFTWARE, including AUTHOR's set up and all copyright notices, logos, end user license agreement and/or trademarks that appear in the SOFTWARE as received from AUTHOR;

(ii) If you redistribute the SOFTWARE in conjunction with your Application, your Application must include a valid copyright notice in your own name, which notice shall be sufficient to protect AUTHOR's copyright in the SOFTWARE;

(iii) If you redistribute the SOFTWARE in conjunction with your Application, and if your Application does not display AUTHOR's end user license agreement to your end user, then your Application must be accompanied by license terms that are at least as restrictive as, and as protective of AUTHOR as, those contained in this EULA;

(iv) You shall not use AUTHOR's name, logo or trademarks to market your Application;

(v ) You shall not modify or alter the SOFTWARE in any way;

(vi ) You shall not redistribute individual parts or files of the SOFTWARE; you must redistribute the SOFTWARE in its entirety;

(vi i) You agree to indemnify, hold harmless and defend Author from and against any claims or lawsuits, including reasonable attorneys' fees, which arise or result from your distribution of the SOFTWARE and/or your Application.

d. Redistribution of Sample Code as Modified by You. You may copy and redistribute any Sample Code that you have modified as described in Section 1(b) above and incorporated into your Application, in both source code form and object code form, subject to the following restrictions and limitations:

(i) You shall distribute the modified Sample Code only in conjunction with and as part of an Application that adds significant and primary functionality to the Sample Code;

(ii) You shall not use AUTHOR's name, logo or trademarks to market your Application;

(iii) You shall to include a valid copyright notice in your own name in your Application, which notice shall be sufficient to protect AUTHOR's copyright in the modified Sample Code; and

(iv) You agree to indemnify, hold harmless and defend AUTHOR from and against any claims or lawsuits including reasonable attorneys' fees, which arise or result from the use or distribution of the modified Sample Code and/or your Application.

e. Identified Software. Your license rights to the SOFTWARE are conditioned upon your (a) not incorporating Identified Software into, or combining Identified Software with, the SOFTWARE, or a derivative work thereof; (b) not distributing Identified Software in conjunction with the SOFTWARE; and (c) not using Identified Software in the development of a derivative work of the SOFTWARE. "Identified Software" means software which is licensed pursuant to terms that directly or indirectly (i) create, or purport to create, obligations for AUTHOR with respect to the SOFTWARE or derivative work thereof or (ii) grant, or purport to grant, to any third party any rights or immunities under AUTHOR's intellectual property or proprietary rights in the SOFTWARE or derivative work thereof. Identified Software includes, without limitation, any software that requires as a condition of use, modification and/or distribution of such software that other software incorporated into, derived from or distributed with such software be (a) disclosed or distributed in source code form; (b) be licensed for the purpose of making derivative works; or (c) be redistributable at no charge.

f. Reservation of Rights. AUTHOR reserves all rights not expressly granted herein.

2. LIMITATIONS ON REVERSE ENGINEERING, DECOMPILATION, AND DISASSEMBLY. You may not reverse engineer, decompile, or disassemble the SOFTWARE, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.

3. NO RENTAL. You may not rent, lease, or lend the SOFTWARE.

4. SUPPORT SERVICES. In the event AUTHOR does provide you with support services related to the SOFTWARE ("Support Services"), use of such Support Services is governed by the AUTHOR policies and programs described in the user manual, in "online" documentation, and/or in other AUTHOR-provided materials. Any supplemental software code provided to you as part of the Support Services shall be considered part of the SOFTWARE and subject to the terms and conditions of this EULA. With respect to technical information you provide to AUTHOR as part of the Support Services, AUTHOR may use such information for its business purposes, including for product support and development. AUTHOR will not utilize such technical information in a form that personally identifies you.

5. TERMINATION. Without prejudice to any other rights, AUTHOR may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE and all of its component parts.

6. INTELLECTUAL PROPERTY RIGHTS. All title and intellectual property rights in and to the SOFTWARE (including but not limited to any images, photographs, animations, video, audio, music, text and "applets" incorporated into the SOFTWARE), and any copies you are permitted to make herein are owned by AUTHOR or its suppliers. All title and intellectual property rights in and to the content which may be accessed through use of the SOFTWARE is the property of the respective content owner and may be protected by applicable copyright or other intellectual property laws and treaties. This EULA grants you no rights to use such content.

7. DISCLAIMER OF WARRANTIES. To the maximum extent permitted by applicable law, AUTHOR and its suppliers provide the SOFTWARE and any (if any) Support Services AS IS AND WITH ALL FAULTS, and hereby disclaim all warranties and conditions, either express, implied or statutory, including, but not limited to, any (if any) implied warranties or conditions of merchantability, of fitness for a particular purpose, of lack of viruses, of accuracy or completeness of responses, of results, and of lack of negligence or lack of workmanlike effort, all with regard to the SOFTWARE, and the provision of or failure to provide Support Services. ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE. THE ENTIRE RISK AS TO THE QUALITY OF OR ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE AND SUPPORT SERVICES, IF ANY, REMAINS WITH YOU.

8. EXCLUSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL AUTHOR OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, PUNITIVE, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY, FOR FAILURE TO MEET ANY DUTY INCLUDING OF GOOD FAITH OR OF REASONABLE CARE, FOR NEGLIGENCE, AND FOR ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE, THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THIS EULA, EVEN IN THE EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, BREACH OF CONTRACT OR BREACH OF WARRANTY OF AUTHOR OR ANY SUPPLIER, AND EVEN IF AUTHOR OR ANY SUPPLIER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

9. LIMITATION OF LIABILITY AND REMEDIES. Notwithstanding any damages that you might incur for any reason whatsoever (including, without limitation, all damages referenced above and all direct or general damages), the entire liability of AUTHOR and any of its suppliers under any provision of this EULA and your exclusive remedy for all of the foregoing shall be limited to the greater of the amount actually paid by you for the SOFTWARE or U.S.$0.02. The foregoing limitations, exclusions and disclaimers shall apply to the maximum extent permitted by applicable law, even if any remedy fails its essential purpose.

10. ENTIRE AGREEMENT. This EULA (including any addendum or amendment to this EULA which is included with the SOFTWARE) is the entire agreement between you and AUTHOR relating to the SOFTWARE and the Support Services (if any) and it supersedes all prior or contemporaneous oral or written communications, proposals and representations with respect to the SOFTWARE or any other subject matter covered by this EULA. To the extent the terms of any AUTHOR policies or programs for Support Services conflict with the terms of this EULA, the terms of this EULA shall control.

11. QUESTIONS? Should you have any questions concerning this EULA, or if you desire to contact AUTHOR for any reason, please write: licensing@www-sharp.com.


www-Sharp.Runtime objects

www-Sharp.Runtime administration COM objects

www-Sharp.Runtime contains some COM objects to simplify its administration. For example on how to use www-Sharp.Runtime administration objects, see source of www-Sharp.Runtime administrator that is located in "C:\Program Files\Common Files\www-Sharp.Runtime\Admin\index.html" (path may be slightly different depending on Windows local).

wwwSharp.Runtime.Admin

Main administration object.

Property | Description
Protocols | Collection that contains protocols (look wwwSharp.Runtime.Protocol).
ScriptMap | Collection that contains script maps.
HasProtocol(string protocol; ForAllUsers: bool = false): bool | Returns true if protocol is registered for www-Sharp.Runtime, false otherwise.

wwwSharp.Runtime.Protocol

This object represents protocol (similar to http: or ftp:). www-Sharp.Runtime registers www-sharp: protocol on install, you can register more protocols for www-Sharp.Runtime.

Property | Description
Name | Protocol name, such as www-sharp (or http)
ForAllUsers | Boolean value that indicates is protocol registered for all users on local computer or only for current user. On Windows 98, Windows Millenium, Windows NT 4 protocols are registered for all users. Modifying settings for all users requires administrator privileges on Windows NT, Windows 2000, Windows XP and Windows 2003.
Domains | Collection that contains domains (look wwwSharp.Runtime.Domain ).
HasDomain (string domain; ForAllUsers: bool = false): bool | Returns true if domain is registered for this protocol , false otherwise.

wwwSharp.Runtime.Domain

This object represents domain (such as www.www-sharp.com in http://www.www-sharp.com). www-Sharp.Runtime registers wwwSharp.Admin domain in www-sharp protocol for administration purposes. All domain names that starts with www-Sharp in www-sharp protocol are reserved for use by www-Sharp and www-Sharp.Runtime.

Property | Description
Name | Domain name, such as wwwSharp.Admin (or www.www-sharp.com)
Protocol | wwwSharp.Runtime.Protocol object this domain is registered for.
ForAllUsers | Boolean value that indicates is domain registered for all users on local computer or only for current user. On Windows 98, Windows Millenium, Windows NT 4 domain s are registered for all users.
BasePath | Directory that is application path for this domain.
BinDirectories | Semicolon-separated list of binary directories. Directories are relatetive to BasePath
ConvertRedirectProtocol | Boolean value. If it is true, when redirecting protocol part is replaced with current protocol name. This value should be set to true for proper work of some ISAPI dlls, for example, for IntraWeb applications. Modifying settings for all users requires administrator privileges on Windows NT, Windows 2000, Windows XP and Windows 2003.

wwwSharp.Runtime.ScriptMap

This object represents script map and is used to set handler for specific extension. For example, it can be used to setup Active Perl as handler for files with .pl extension. Handler is ISAPI dll or CGI exe. Script map can be administated with www-sharp://www-Sharp.Admin/scriptmap.html.

Property | Description
Ext | File extension with leading period, such as ".php" (without quotes).
Handler | Program that will handle files with specified extension. Can be ISAPI .dll or CGI .exe.
ForAllUsers | Boolean value that indicates is script map registered for all users on local computer or only for current user. On Windows 98, Windows Millenium, Windows NT 4 script maps are registered for all users. Modifying settings for all users requires administrator privileges on Windows NT, Windows 2000, Windows XP and Windows 2003.

Collections

Protocols and Script map properties of wwwSharp.Runtime.Admin object and Domains property of wwwSharp.Runtime.Protocol object are collections.

Property | Description
Count | Returns count of objects in collection.
Item(index: Variant) | Returns item in collection. Index could be integer or string.
Add(item: object) | Adds new item in collection.
Remove(item: Variant) | Removes item from collection. item parameter can be integer, string or object.
Refresh() | Refreshes collection.